// 批量引入data目录下的js文件 并导出
import { ModuleTypes } from './common/hook-types'

const allHook: __WebpackModuleApi.RequireContext = require.context('./common', true, /\.ts$/)

const modules = allHook.keys().reduce((modules, modulePath) => {
  const value = allHook(modulePath)
  return { ...modules, ...value }
}, {})

export default {
  ...(modules as ModuleTypes)
}
